Spread WPF Documentation
SavePdf(Stream,PdfExportSettings,Int32[]) Method
Example 


Stream to which to save the data.
The export settings.
The sheet indexes.
Saves the content of the component to the specified stream.
Syntax
'Declaration
 
Public Overloads Sub SavePdf( _
   ByVal stream As System.IO.Stream, _
   ByVal settings As PdfExportSettings, _
   ByVal ParamArray sheetIndexes() As System.Integer _
) 
'Usage
 
Dim instance As GcSpreadSheet
Dim stream As System.IO.Stream
Dim settings As PdfExportSettings
Dim sheetIndexes() As System.Integer
 
instance.SavePdf(stream, settings, sheetIndexes)
public void SavePdf( 
   System.IO.Stream stream,
   PdfExportSettings settings,
   params System.int[] sheetIndexes
)

Parameters

stream
Stream to which to save the data.
settings
The export settings.
sheetIndexes
The sheet indexes.
Example
This example uses the SavePdf method.
string fileName;
fileName = "c:\\zipfile\\test.pdf";
System.IO.Stream stream;
stream = System.IO.File.Create(fileName);

 gcSpreadSheet1.Workbook.Name = "WorkBook";
 gcSpreadSheet1.Sheets[0].Name = "Sheet 0";
GrapeCity.Windows.SpreadSheet.Data.PrintInfo printtest;
printtest = gcSpreadSheet1.Sheets[0].PrintInfo;
printtest.FooterCenter = "This is Page &P";
printtest.HeaderCenter = "&A of &F";
printtest.BestFitColumns = true;
printtest.UseMax = true;

GrapeCity.Windows.SpreadSheet.Data.PdfExportSettings test;
test = new GrapeCity.Windows.SpreadSheet.Data.PdfExportSettings();
test.Title = "Print PDF";
test.Author = "GrapeCity, Inc.";
test.DisplayDocTitle = true;
test.FitWindow = true;
gcSpreadSheet1.SavePDF(stream, test, 0);
Dim fileName As String
fileName = "c:\zipfile\test.pdf"
Dim stream As System.IO.Stream
stream = System.IO.File.Create(fileName)

GcSpreadSheet1.Workbook.Name = "WorkBook"
GcSpreadSheet1.Sheets(0).Name = "Sheet 0"
Dim printtest As GrapeCity.Windows.SpreadSheet.Data.PrintInfo
printtest = GcSpreadSheet1.Sheets(0).PrintInfo
printtest.FooterCenter = "This is Page &P"
printtest.HeaderCenter = "&A of &F"
printtest.BestFitColumns = True
printtest.UseMax = True


Dim test As GrapeCity.Windows.SpreadSheet.Data.PdfExportSettings
test = New GrapeCity.Windows.SpreadSheet.Data.PdfExportSettings()
test.Title = "Print PDF"
test.Author = "GrapeCity, Inc."
test.DisplayDocTitle = True
test.FitWindow = True
GcSpreadSheet1.SavePDF(stream, test, 0)
Requirements

Target Platforms: Windows 7, Windows 8 Desktop, Windows Vista SP1 or later, Windows Server 2000, Windows 2000 Professional (SP4), Windows XP (SP2), Windows 2008, Windows 2003 Server (SP1)

See Also

Reference

GcSpreadSheet Class
GcSpreadSheet Members
Overload List

 

 


Copyright © GrapeCity, inc. All rights reserved.